Skip to content

Accept additional compatible model specifiers on release manifests#798

Merged
MaxGhenis merged 2 commits intomainfrom
expand-compatible-models
May 5, 2026
Merged

Accept additional compatible model specifiers on release manifests#798
MaxGhenis merged 2 commits intomainfrom
expand-compatible-models

Conversation

@MaxGhenis
Copy link
Copy Markdown
Contributor

Summary

Extends build_release_manifest with an additional_compatible_specifiers parameter so the published release_manifest.json can declare compatibility with a range of policyengine-us versions, not only the exact version used at build time.

Why

The current behaviour emits exactly one entry in compatible_model_packages==<build_version> — even when the build-time model has the same data_build_fingerprint as a range of neighbouring versions. Downstream consumers (policyengine.py, policybench) can only certify against that one pin.

In practice this has bitten us: the latest HF main release manifest pins ==1.637.0, which fails parameter validation against policyengine-core>=3.25.0. Downstream projects that want to use the certified bundle have no compatible model version to install.

Giving the data build pipeline the ability to declare e.g. ">=1.637.0,<2.0.0" when the fingerprint is stable closes that gap.

Companion PR

PolicyEngine/policyengine.py#284 extends the consuming side to parse full PEP 440 specifiers via packaging.specifiers.SpecifierSet.

Test plan

  • New test test_build_release_manifest_adds_additional_compatible_specifiers — passes
  • All 6 existing release-manifest tests continue to pass

🤖 Generated with Claude Code

`build_release_manifest` now takes `additional_compatible_specifiers`:
a list of PEP 440 specifier strings that extend the
`compatible_model_packages` list beyond the single `==<build_version>`
entry it emits by default.

Motivation: when the `data_build_fingerprint` is stable across a range
of `policyengine-us` versions, the data package can declare
compatibility without forcing downstream consumers (policyengine.py,
policybench) to rebuild the dataset for every model patch release.
Without this, the published release manifest lists only the exact
build-time model version, which in practice is sometimes a broken pin
(1.637.0 fails parameter validation against current policyengine-core).

The policyengine.py side that consumes these specifiers was extended
in PolicyEngine/policyengine.py#284 to handle full PEP 440 specifiers
via packaging.specifiers.SpecifierSet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MaxGhenis added a commit that referenced this pull request Apr 21, 2026
Align data-side TRO with canonical TROv 0.1 and policyengine.py bundle-side TRO.

Subagent review (CLEAN):
- canonical TROv 0.1 vocabulary verified against trov.ttl
- canonical_json_bytes and composition-fingerprint algorithm byte-identical to policyengine.py
- structured pe:* provenance fields (not prose)
- JSON schema validates emitted TROs
- uploader emits floating + versioned paths for both release_manifest.json and trace.tro.jsonld

Admin-merging: integration-tests hits pre-existing test_aca_calibration tolerance failure identical to PR #798; TRO code isn't imported during the data build path. Companion issue PolicyEngine/policyengine.py#313 tracks bundle-side namespace migration.
# Conflicts:
#	policyengine_us_data/tests/test_release_manifest.py
#	policyengine_us_data/utils/release_manifest.py
@MaxGhenis MaxGhenis merged commit d631e00 into main May 5, 2026
10 checks passed
@MaxGhenis MaxGhenis deleted the expand-compatible-models branch May 5, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant